package com.zhu.bitcom.handler

import cn.dev33.satoken.exception.NotLoginException
import com.zhu.bitcom.utils.*
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.RestControllerAdvice

@RestControllerAdvice
class GlobalExceptionHandler {

    @ExceptionHandler
    fun handlerNotLoginException(e: NotLoginException): Result<String> {
        //e.printStackTrace()
        return Result.error("token 无效")
    }
}